﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace HQPad.Models
{
    /// <summary>A bonus represents a character stat bonus such as life, ac, dex etc.</summary>
    public class Bonus
    {
        private int quantity = 1;

        public int SkillID { get; set; }
        public virtual Skill Skill { get; set; }

        [Key]
        public int BonusID { get; set; }

        [Required(ErrorMessage="The bonus type is required.")]
        [MaxLength(50, ErrorMessage="The max length for a bonus type is 50 characters.")]
        public string Type { get; set; }

        public int Quantity
        {
            get{ return quantity; }
            set { quantity = value; }
        }

        [Display(Description="An optional value for the bonus such as level of spell slot granted.")]
        public string Value { get; set; }

        [Display(Description = "An optional requirement for the bonus such as armour must be equipped.")]
        public string Requirement { get; set; }
    }
}